#@layout()

#define main()

<div class="jfa-header-box" id="jfa-header-box">
    <div class="jfa-crumbs" id="jfa-crumbs">
        <a href="#(ctx)/admin/rackFrame">挂具电泳框对照表</a> / 修改
    </div>

    <div class="jfa-search-box"></div>
    #include("/_view/common/_header_right.html")
</div>


<div class="jfa-content-box" id="jfa-content-box">
    <div class="jfa-content" id="jfa-content">
        <form class="form-horizontal margin-top-30" id="rackFrameForm" action="#(ctx)/admin/rackFrame/update" method="post">

            <input type="hidden" name="middle.id" value="#(middle.id)" />

            <div class="form-group">
                <label class="col-sm-4 control-label">挂具编号</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" autocomplete="off" name="middle.hangerNo" value="#(middle.hangerNo??)">
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-4 control-label">电泳框编号</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" autocomplete="off" name="middle.frameNo" value="#(middle.frameNo??)">
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-offset-4 col-sm-8">
                    <input class="btn btn-primary" type="submit" value="提交" />
                </div>
            </div>
        </form>
    </div><!-- END OF jfa-content -->
</div><!-- END OF jfa-content-box -->

<style type="text/css">
	#rackFrameForm {
		width: 500px;
	}

	.form-group {
		margin-bottom: 25px;
	}

	.jfa-content label {
		line-height: 1;
		vertical-align: baseline;
		color: #23527c;
		font-size: 20px;
		font-weight: normal;
		margin-bottom: 8px;;
	}
</style>

<script type="text/javascript">
	$(document).ready(function() {
		$("#rackFrameForm").ajaxForm({
			dataType: "json"
			, beforeSubmit: function(formData, jqForm, options) {}
			, success: function(ret) {
				if (ret.state == "ok") {
					location.href = "#(ctx)/admin/rackFrame";
				} else {
					showFailMsg(ret.msg);
				}
			}
			, error: function(ret) {alert(ret.statusText);}
			, complete: function(ret) {} 	      // 无论是 success 还是 error，最终都会被回调
		});
	});
</script>
#end